# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=pinentry-bemenu
pkgver=0.13.1
pkgrel=0
pkgdesc="Pinentry based on bemenu"
url="https://github.com/t-8ch/pinentry-bemenu"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	bemenu-dev
	libassuan-dev
	libgpg-error-dev
	meson
	popt-dev
	samurai
	"
source="https://github.com/t-8ch/pinentry-bemenu/archive/v$pkgver/pinentry-bemenu-$pkgver.tar.gz
	meson-ungit.patch
	"

build() {
	echo "$pkgver" > VERSION
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
9cdb4a3876c96900dc5ae31ad8520e0f5bc337a7e97e30c35fc0898c5f25dea322b9f41afa191a75eb3502455a96f2cb03f3699802ac38dcd1af67445fb8a3b2  pinentry-bemenu-0.13.1.tar.gz
45e542b6feef5d8b61b84a93572f04bb3ec8d972eb820b9fef5f04a67e0e44adb252eeb6cbcd53b3942006f3bb2179d894050b1640f6cf4607cd912c26c934dc  meson-ungit.patch
"
